package com.zerotwo.exam.center.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zerotwo.exam.center.model.QuestionItem;
import com.zerotwo.exam.center.mapper.QuestionItemMapper;
import com.zerotwo.exam.center.service.IQuestionItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author 02
 * @version 1.0
 * @Date 2024/7/5
 * @Description 题目选择表 服务实现类
 */
@Service
public class QuestionItemServiceImpl extends ServiceImpl<QuestionItemMapper, QuestionItem> implements IQuestionItemService {

    /**
     * 获取题目项
     *
     * @param questionId 问题id
     * @return {@link List}<{@link QuestionItem}>
     */
    @Override
    public List<QuestionItem> getQuestionItems(int questionId) {
        return list(new LambdaQueryWrapper<QuestionItem>().eq(QuestionItem::getQuestionId,questionId));
    }

}
